<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ page contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<%@ include file="/common/init.jsp"%>
<html>
<head>
<script type="text/javascript" src="resources/js/jquery-1.7.2.min.js"></script>
<title>Insert title here</title>
<script type="text/javascript">
$(function(){
	$("#bnt").click(function(){
		
		$("#bnt").val("提交中");
		$("#bnt").attr("disabled","disabled");
		jQuery.ajax({
			url: "${ctx}/sycuser.action",
			type: "post",
			dataType:"html",
			async:false,
			success: function(jsondata){
				alert(jsondata);
				$("#bnt").attr("disabled",true);
			},
			error: function(XMLHttpRequest, textStatus, errorThrown) {
		    }
		});
	});
	
$("#bnt2").click(function(){
		
		$("#bnt").val("提交中");
		$("#bnt").attr("disabled","disabled");
		jQuery.ajax({
			url: "${ctx}/getUser.action",
			type: "post",
			dataType:"html",
			async:false,
			success: function(jsondata){
				alert(jsondata);
				$("#bnt").attr("disabled",true);
			},
			error: function(XMLHttpRequest, textStatus, errorThrown) {
		    }
		});
	});
});
</script>
</head>
<body>
<input type="button" name="" id="bnt" value="同步"/><br />
<input type="button" name="" id="bnt2" value="获取数据"/>
</body>
</html>